package dreamtwodancetiktokenumsmymongo

const (
	DanceCityChangeLogChangeTypeOccupy            = 1 //攻城占领
	DanceCityChangeLogChangeTypeActiveLeave       = 2 //主动离开
	DanceCityChangeLogChangeTypePassiveLeave      = 3 //被动离开(守城失败)
	DanceCityChangeLogChangeTypeDayLeave          = 4 //日清离开
	DanceCityChangeLogChangeTypeMonthLeave        = 5 //月清离开
	DanceCityChangeLogChangeTypeDissolveTeamLeave = 6 //解散战队离开
	DanceCityChangeLogChangeTypeOccupyEmptyCity   = 7 //攻城空城占领
)

type DanceCityChangeLogEnums struct {
}

var DanceCityChangeLogEnumsObject DanceCityChangeLogEnums

func (e DanceCityChangeLogEnums) ChangeType() []int {
	return []int{
		DanceCityChangeLogChangeTypeOccupy,
		DanceCityChangeLogChangeTypeActiveLeave,
		DanceCityChangeLogChangeTypePassiveLeave,
		DanceCityChangeLogChangeTypeDayLeave,
		DanceCityChangeLogChangeTypeMonthLeave,
		DanceCityChangeLogChangeTypeDissolveTeamLeave,
		DanceCityChangeLogChangeTypeOccupyEmptyCity,
	}
}

func (e DanceCityChangeLogEnums) ChangeTypeMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.ChangeType() {
		m[s] = e.ChangeTypeString(s)
	}
	return m
}

func (e DanceCityChangeLogEnums) ChangeTypeString(tag int) string {
	switch tag {
	case DanceCityChangeLogChangeTypeOccupy:
		return "攻城占领"
	case DanceCityChangeLogChangeTypeActiveLeave:
		return "主动离开"
	case DanceCityChangeLogChangeTypePassiveLeave:
		return "被动离开(守城失败)"
	case DanceCityChangeLogChangeTypeDayLeave:
		return "日清离开"
	case DanceCityChangeLogChangeTypeMonthLeave:
		return "月清离开"
	case DanceCityChangeLogChangeTypeDissolveTeamLeave:
		return "解散战队离开"
	case DanceCityChangeLogChangeTypeOccupyEmptyCity:
		return "攻城空城占领"
	default:
		return "其他"
	}
}
